<script lang="ts">
export default {
  name: "GoodsList",
  beforeRouteLeave(to,from,next){
    console.log('beforeRouteLeave');
    if(window.confirm('确定离开当前页面吗>???')){
      next();
    }
  }
}
</script>

<template>
  <div>
    <h3>商品列表</h3>
    <input type="text">
  </div>
</template>

<style scoped lang="less">

</style>
